Generally speaking, there are many smartphone applications that require the ability to scan a barcode. In order to add this functionality to their application (app), developers quite frequently rely on a 3rd party software development kits to add this functionality directly within their application. The functionality gives the smartphone user access to barcode scanning only from within that particular application. If a user wants a universal method of scanning barcodes across all their applications, usually, this is not available.
Sometimes a keyboard wedge style application is used to facilitate universal scanning in any application. A keyboard wedge can be either a software program or an inserted hardware device that translates digital signals from a barcode reader or a magnetic strip reader into keyboard strokes for a smart device or a computer. The software form of a keyboard wedge intercepts the digital signals from the reader when they arrive at the computer and instantly translates them into keyboard strokes. The hardware form of a keyboard wedge inserts the translation device between the reader and the keyboard. Data sent through a wedge appears as if it was typed into the computer, while the keyboard itself remains fully functional. Because a computer or smartphone using a keyboard wedge can't tell the difference between data that is entered by a scanning device or data that is entered by keyboard typing, a wedge can be used to easily add barcode reading capability to an existing device without modifying software applications.
A keyboard wedge-style application can be used to facilitate universal scanning in any application by keeping a background service running that responds to a particular key press. When the service detects this key press, it brings up the barcode scanner and inserts the resultant scan data into the keyboard buffer so that is it inserted at the cursor as text in whichever application has focus at the moment. This is usually a somewhat clumsy operation, as it requires a scan wedge application to first be started and running in the background. The user also needs to be aware of the hardware button that will trigger a scan event.
Today, many smartphone operating systems allow you to create custom software keyboards (soft input panels) which are sometimes used to add a barcode scanning button and scan wedge functionality. When the custom keyboard is loaded, if the user wants to enter barcode data into a text field, the user simply opens the software keyboard, hits the scanner button, scans the barcode, and the result is placed in the text field. However, when the scanning trigger occurs, the application loses context, that is the running application is no longer displayed, while the barcode scanner preview screen is displayed. This might worry some users that the application they were just in was closed and that they possibly lost their data.
Therefore, a need exists for a method and an application to scan and decode a barcode on a smartphone without losing context of a running application.